class CreateTimeRules < ActiveRecord::Migration[5.2]
  def change
    create_table :time_rules do |t|
      t.integer :work_time_id,  null: false,  limit: 8
      t.string  :type,          null: false,  limit: 32
      t.string  :value,         null: false
      t.timestamps              null: false
    end

    add_foreign_key :time_rules,  :work_times
  end
end
